package com.itheima.作业.电脑;

public class Computer {


    void startup(){
        System.out.println("电脑启动了");
    }
    void shutdown(){
        System.out.println("电脑关机了");
    }
    void connect(USB xingcan){
        if (xingcan instanceof Mouse){
            xingcan.connect();
        }
        if (xingcan instanceof Keybord){
            xingcan.connect();
        }
    }
    void disconnect(USB usb) {
        if (usb instanceof Mouse){
            usb.disConnect();
        }
        if (usb instanceof Keybord){
            usb.disConnect();
        }
    }


}
